#ifndef COMMON_H
#define COMMON_H

#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <map>

/**
 * ide发给管理服务的消息封装类
 * 
 {
	"name":"plugin",
	"command":"restart",
	"args": {
		"jsBundle":"blabla",
		"deviceType":"blabla"
	}
 }
 */ 
struct CMessage
{
    std::string name;
    std::string command;
    std::map<std::string, std::string> args;
    static CMessage parseJson(const std::string& json);
    std::string toString();
};



bool ReadFileContent(const char* pFilePath, std::ios_base::openmode mode,std::string& strContent);
std::string TrimUTF8BOM(const std::string& msg);

#endif // COMMON_H
